<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common_css :: commonHeader('发布流程')"></head>
<body>
<!-- 发布流程 -->
<div id="workflowfile" class="easyui-dialog" style="width:400px;height:280px"
     closed="true" modal="true" buttons="#dlg-buttons1">
    <form id="myform" enctype="multipart/form-data" method="post">
        <table width="100%" style="margin-top: 5px">
            <tr>
                <td class="tdLabel" width="25%" align="right">流程名称</td>
                <td width="75%">
                    <input name="filename" id="filename"
                           class="easyui-validatebox" data-options="required:true"
                           missingMessage="请输入流程名称">
                </td>
            </tr>
            <tr>
                <td class="tdLabel" width="25%" align="right">流程文件</td>
                <td width="75%">
                    <input onclick="file.click();" readonly type="text" class="easyui-validatebox" id="changename"
                           data-options="required:true"
                           missingMessage="请选择流程文件"/>
                    <!--  <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-tip" onclick="file.click();">浏览</a>-->
                    <input onchange="change(this.value);" accept=".zip" type="file" name="file" id="file"
                           style="display: none;">
                    <font color="red"> 请上传zip格式的文件 </font>
                </td>
            </tr>
        </table>
    </form>
</div>

<br>
<div id="toolbar">
    <a href="javascript:void(0)" ifAllGranted='E030201' class="easyui-linkbutton" iconcls="icon-add"
       onclick="openDialog()">流程发布</a>
    <a href="javascript:void(0)" ifAllGranted='E030202' class="easyui-linkbutton" iconCls="icon-tip" onclick="openWorkflowImg()">查看流程图</a>
    <a href="javascript:void(0)" ifAllGranted='E030203' class="easyui-linkbutton" iconcls="icon-cancel"
       onclick="deldeployment()">删除</a>
</div>
<div id="dg"></div>

<div id="queryProcess" class="easyui-dialog" style="width:400px;height:280px"
     closed="true" modal="true" buttons="#dlg-buttons2">
    <form id="digFrom">
        <table cellpadding="2px" cellspacing="0" class="form-table">
            <tr>
                <td align="right">流程定义名称</td>
                <td>
                    <input disabled name="name"></input>
                    <input type="hidden" name="deploymentId">
                </td>
            </tr>
            <tr>
                <td align="right">流程定义的KEY</td>
                <td>
                    <input disabled name="key"/>
                </td>
            </tr>
            <tr>
                <td align="right">流程定义的版本</td>
                <td>
                    <input disabled name="version"></input>
                </td>
            </tr>
            <tr>
                <td align="right">流程定义的规则文件名称</td>
                <td>
                    <input disabled name="resourceName"/>
                </td>
            </tr>
            <tr>
                <td align="right">流程定义的规则图片名称</td>
                <td>
                    <input disabled name="diagramResourceName"></input>
                </td>
            </tr>
        </table>
    </form>
</div>

<div id="openWorkflowImg" class="easyui-dialog" style="width:1100px;height:500px" collapsible="true" closed="true"
     modal="true">
</div>

<div id="dlg-buttons1" style="text-align:center">
    <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
       onclick="workflowfile()">上传流程</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-back"
       onclick="javascript:$('#workflowfile').dialog('close')">返回</a>
</div>
<div id="dlg-buttons2" style="text-align:center">
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-back"
       onclick="javascript:$('#queryProcess').dialog('close')">返回</a>
</div>
<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/activiti/repository.js}"></script>
</body>
</html>